/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aiaudio.database.tablegroup;

import aiaudio.lastfm.hbase.CannotCreateTableException;
import aiaudio.database.DatabaseStorage;
import aiaudio.database.tables.TableStructure;
import java.io.IOException;

/**
 *
 * @author nastya
 */
public class ReduceArtistsAlgTableGroup extends TableGroup{

    private String dictionaryTable = "reduce_dictionary";
    private String reducedTable = "reduce_result";

    public void setDictionaryTable(String dictionaryTable) {
        this.dictionaryTable = dictionaryTable;
    }

    public void setReducedTable(String reducedTable) {
        this.reducedTable = reducedTable;
    }

    public String getDictionaryTable() {
        return addKey(dictionaryTable);
    }

    public String getReducedTable() {
        return addKey(reducedTable);
    }       
    
    public ReduceArtistsAlgTableGroup(String key, boolean dropIfExists) {
        super(key, dropIfExists);
    }

    @Override
    public void create(DatabaseStorage storage) throws CannotCreateTableException, IOException {
        createTable(storage, getDictionaryTable(), TableStructure.ReduceDictionary);
        createTable(storage, getReducedTable(), TableStructure.ReduceResult);
    }
    
}
